package com.cy.sys;

import com.cy.sys.service.ShiroRealm;
import org.apache.shiro.realm.Realm;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class ShiroApplication {
    public static void main(String[] args) {
        SpringApplication.run(ShiroApplication.class, args);

    }
    //在启动类中添加Realm对象配置
    @Bean
    public Realm realm(){
        return new ShiroRealm();
    }
}

